package com.gtw.modules.sys.service.impl;

import com.gtw.modules.dao.TbDiscountDao;
import com.gtw.modules.entity.TbDiscount;
import com.gtw.modules.sys.service.SysDiscountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**优惠接口实现类
 *
 * @author wuye
 * @date 2018/1/31
 */
@Service
public class SysDiscountServiceImpl implements SysDiscountService {

    @Autowired
    private TbDiscountDao discountDao;

    @Override
    public TbDiscount queryObject(Integer id){
        return discountDao.queryObject(id);
    }

    @Override
    public List<TbDiscount> queryList(Map<String, Object> map){
        return discountDao.queryList(map);
    }

    @Override
    public int queryTotal(Map<String, Object> map){
        return discountDao.queryTotal(map);
    }

    @Override
    public void save(TbDiscount discount){
        discountDao.save(discount);
    }

    @Override
    public void update(TbDiscount discount){
        discountDao.update(discount);
    }

    @Override
    public void delete(Integer id){
        discountDao.delete(id);
    }

    @Override
    public void deleteBatch(Integer[] ids){
        discountDao.deleteBatch(ids);
    }
}
